/*
 * @Descripttion: 
 * @version: 
 * @Author: turingchang
 * @Date: 2020-08-28 16:08:51
 * @LastEditors: turingchang
 * @LastEditTime: 2020-09-04 10:47:08
 */

const Service = require('egg').Service;

class RoleService extends Service {
    async list() {
        const role_list = await this.ctx.model.Admin.Role.findAll({
            include: {
                model: this.ctx.app.model.Admin.Admin
            },
            where:{
                status:this.ctx.app.enums.status.normal.value
            },
        });
        return role_list;
    }
    async get(id) {
        const user = await this.ctx.model.Admin.Role.findByPk(id);
        return user;
    }
    async create(user) {
        const res =null;// await this.ctx.model.User.create(user);
        return res;
    }

    
  
}

module.exports = RoleService;